<{include file="common/header.tpl"}>

<style>
.fcontent { padding: 1em; }
.userMsg .list { position: relative; display: table; width: 100%; padding-top: 10px; }

.userMsg .list .left { display: table-cell; width: 44px; padding-right: 10px; }

.userMsg .list .left img { width: 34px; height: 34px; border-radius: 50%; }

.userMsg .list .right { display: table-cell; padding-bottom: 13px; vertical-align: top; border-bottom: 1px solid #e0e0e0; }

.userMsg .list .right .title { font: normal 14px/22px 'Helvetica'; color: #888; }

.userMsg .list .right .title span { margin-right: 6px; color: #333; }

.userMsg .list .right .date { font: normal 12px/26px 'Helvetica'; color: #8b8b8b; }

.userMsg .list .right .content { font: normal 16px 'Helvetica'; color: #666; }

.userMsg .tupian { position: absolute; top: 15px; right: 10px; width: 78px; height: 56px; border-radius: 4px; }

/* 消息页结束 */
/* 商品详情页开始 */
</style>


<div class="fcontent">
    <h3>用户消息列表</h3>

    <{if $messages.total == 0}>
    <!-- 当没有消息的时候 start -->
    <div class="news" style="position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); text-align: center; ">
        <h2><img src="/resource/skin/img/ucenter_news.png" height="48" width="48" alt=""></h2>
        <p style="margin-top: 20px; font-size: 14px; color: #ccc; ">什么都没有...</p>
    </div>
    <!-- 当没有消息的时候 end -->
    <{else}>

    <!-- 当有消息的时候 start -->

    <ul class="userMsg" style="padding: 10px 0 10px 7px;">
        <{foreach from=$messages.list item=msg}>
        <li class="list fix">
            <div class="left"><img src="<{$msg.fromUserIcon}>" alt=""></div>
            <div class="right">
                    <{if $msg.fromUserUid > 0}>
                    <p class="title"><span><{$msg.fromUserName}></span>回复了你</p>
                    <{else}>
                    <p class="title"><span><{$msg.fromUserName}></span></p>
                    <{/if}>
                    <p class="date"><{$msg.createdFormated}></p>
                    <p class="content"><{$msg.message}></p>
            </div>
            <{if $msg.url}>
            <a href="javascript:;" title=""><img class="tupian" src="<{$msg.image}>" alt=""></a>
            <{else}>
            <{/if}>
        </li>
        <{/foreach}>
    </ul>

    <!-- 当有消息的时候 end -->
    <{/if}>


</div>

<{include file="common/footer.tpl"}>
